using System;
using System.Collections.Generic;
using System.Text;

using System.Data;
using System.Data.OleDb;
using System.Collections;
using DAO;
using DTO;

namespace BUS
{
    public class TheLoaiBus
    {
        // Them
        public void Them(TheLoaiDto tlDto)
        {
            // Kiem tra Business Rule

            TheLoaiDao tlDao = new TheLoaiDao();
            tlDao.Them(tlDto);
        }

        // Xoa
        public void Xoa(int maTheLoai)
        {
            // Kiem tra Business Rule neu co
            TheLoaiDao tlDao = new TheLoaiDao();
            tlDao.Xoa(maTheLoai);
        }

        // Sua
        public void Sua(TheLoaiDto tlDto)
        {
            // Kiem tra Business Rule neu co
            TheLoaiDao tlDao = new TheLoaiDao();
            tlDao.Sua(tlDto);
        }

        // Tim Kiem
        public TheLoaiDto TimKiem(int maTheLoai)
        {
            // Kiem tra Business Rule neu co
            TheLoaiDto tlDto;
            TheLoaiDao tlDao = new TheLoaiDao();
            tlDto = tlDao.TimKiem(maTheLoai);
            return tlDto;
        }

        // Lay Bang
        public DataSet LayBang()
        {
            // Kiem tra Business Rule neu co
            DataSet ds;
            TheLoaiDao tlDao = new TheLoaiDao();
            ds = tlDao.LayBang();
            return ds;
        }

        // Cap Nhat Bang
        public void CapNhatBang(DataSet ds)
        {
            // Kiem tra Business Rule neu co
            TheLoaiDao tlDao = new TheLoaiDao();
            tlDao.CapNhatBang(ds);
        }

        // Lay Danh Sach
        public IList LayDanhSach()
        {
            // Kiem tra Business Rule neu co
            IList ds;
            TheLoaiDao tlDao = new TheLoaiDao();
            ds = tlDao.LayDanhSach();
            return ds;
        }

        //public DataTable TimKiem(HocSinhCrt hsCrt)
        //{
        //    DataTable dt;
        //    TheLoaiDao hsDao = new CuonSachDao();
        //    dt = hsDao.TimKiem(hsCrt);
        //    return dt;
        //}
    }
}
